package app.games;

import java.util.Vector;

import app.User;

public class ServerGame implements Comparable<ServerGame> {
	
	public ServerGame(long i) {
		id = i;
		boards = new Vector<Object>();
		users = new Vector<User>();
	}
	
	public void addBoard(Object b, User u) {
		boards.add(b);
		users.add(u);
	}
	
	public int getBoardsCount() {
		return boards.size();
	}
	
	public Object getBoard(int i) {
		return boards.get(i);
	}
	
	public User getUser(int i) {
		return users.get(i);
	}
	
	public boolean equals(Object o) {
		ServerGame i = (ServerGame)o;
		return (id == i.id);
	}
	
	public int compareTo(ServerGame o) {
		return equals(o) ? 0 : -1 ;
	}
	
	private long id;
	private Vector<User> users;
	private Vector<Object> boards;
}
